function PLOT_runmean(dat, cohs, rmSize, showEvery)% function PLOT_runmean(dat, cohs, rmSize, showEvery)%% dat is nx3, with columns% coh, abt, dat%% 3.1.00 jig created% useful stuffif nargin < 2 | isempty(cohs)	cohs = [0 32 64 128 256 512];endif nargin < 3 | isempty(rmSize)	rmSize = 100;endif nargin < 4 | isempty(showEvery)	showEvery = 50;endjigax(gca, 14);hold on;  % colorsco = {'k' 'c' 'm' 'r' 'g' 'b' 'y'};for i = 1:length(cohs)		Ls = dat(:,1) == cohs(i);		if size(find(Ls),1) > 0				ds = dat(Ls, 3); % dots		ts = dat(Ls, 2); % abort times				% sort by abort time		[y, I] = sort(ts);				% plot run mean		xx = ts(I);		yy = nanrunmean(ds(I), rmSize);		Le = showEvery*cumsum(ones(fix(length(xx)/showEvery),1));		plot(xx(Le), yy(Le), '-', 'Color', co{i}, 'LineWidth', 1);					endend